package com.bytz.modules.cms.order.constant;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class OrderConstants {

    /**
     * 订单状态字典项 mall_order_status
     */
    public static final class OrderStatus {
        /**
         * 草稿
         */
        public static final String CAO_GAO = "CaoGao";


        /**
         * 已提交
         */
        public static final String YI_TI_JIAO = "YiTiJiao";

        /**
         * 订单审核中
         */
        public static final String SHEN_HE_ZHONG = "ShenHeZhong";
        /**
         * 审核通过
         */
        public static final String SHEN_HE_TONG_GUO = "ShenHeTongGuo";
        /**
         * 待盖章
         */
        public static final String DAI_GAI_ZHANG = "DaiGaiZhang";
        /**
         * 莱宝已盖章，等待经销商上传合同
         */
        public static final String DAI_SHANG_CHUAN_HE_TONG = "DaiShangChuanHeTong";
        /**
         * 待提交预付款
         */
        public static final String DAI_YU_FU = "DaiYuFu";
        /**
         * 已提交预付款
         */
        public static final String YI_YU_FU = "YiYuFu";
        /**
         * 产品排产中
         */
        public static final String PAI_CHAN_ZHONG = "PaiChanZhong";
        /**
         * 待提交尾款
         */
        public static final String DAI_TI_JIAO_WEI_KUAN = "DaiTiJiaoWeiKuan";
        /**
         * 已完成
         */
        public static final String YI_WAN_CHENG = "YiWanCheng";
        /**
         * 已终止
         */
        public static final String YI_ZHONG_ZHI = "YiZhongZhi";

        /**
         * 可付预付的状态
         */
        public static final List<String> CAN_PREPAY_STATUS = Collections.singletonList(DAI_YU_FU);

        /**
         * 可付预付的状态
         */
        public static final List<String> CAN_BALANCE_PAY_STATUS = Arrays.asList(YI_YU_FU, PAI_CHAN_ZHONG, DAI_TI_JIAO_WEI_KUAN);
    }

    /**
     * 系统状态字典项 mall_sys_status
     */
    public static final class SysStatus {
        /**
         * c4c报价单已创建
         */
        public static final String C4C_QUOTATION = "c4cQuotation";
        /**
         * sap报价单已创建
         */
        public static final String SAP_QUOTATION = "sapQuotation";
        /**
         * sap订单已创建
         */
        public static final String SAP_ORDER = "sapOrder";
    }

    /**
     * 订单类型字典项 mall_order_type
     */
    public static final class OrderType {
        /**
         * 标准订单
         */
        public static final String STANDARD = "1";
        /**
         * 项目订单
         */
        public static final String PROJECT = "2";
    }

    /**
     * 优惠券状态字典项 order_coupon_type
     */
    public static final class CouponType {
        /**
         * 已启用
         */
        public static final String ENABLE = "1";
        /**
         * 已停用
         */
        public static final String DISABLE = "2";
    }

    /**
     * ec状态字典项 order_ec_status
     */
    public static final class EcStatus {
        /**
         * 未提交
         */
        public static final String UNCOMMITTED = "Uncommitted";
        /**
         * 已退回
         */
        public static final String REJECT = "Reject";
        /**
         * 审批中
         */
        public static final String APPROVING = "Approving";

        /**
         * 审核通过
         */
        public static final String CHECKED = "Checked";

        /**
         * 中止
         */
        public static final String TERMINATED = "Terminated";
    }

    /**
     * ec是否提交状态
     */
    public static final class EcRequired {
        /**
         * 可选提交
         */
        public static final String OPTIONAL = "Optional";
        /**
         * 必须提交
         */
        public static final String NECESSARY = "Necessary";
        /**
         * 不显示ec
         */
        public static final String UNNECESSARY = "Unnecessary";
    }


    /**
     * 订单流程规则绑定变量名
     */
    public static final class OrderFlowRuleBindings {
        /**
         * 订单
         */
        public static final String ORDER = "order";

        /**
         * 订单项
         */
        public static final String ORDER_ITEM = "orderItems";
    }

    /**
     * 订单流程规则类型
     */
    public static final class OrderFlowRuleType {
        /**
         * 全局
         */
        public static final String GLOBAL = "0";

        /**
         * 私有
         */
        public static final String PRIVATE = "1";
    }

    /**
     * 订单付款方式
     */
    public static final class OrderPayType {
        /**
         * 电汇
         */
        public static final String ONLINE = "电汇";
    }

    /**
     * 生成合同常量
     */
    public static final class ContractDoc {
        /**
         * 日期格式
         */
        public static final String DATE_PATTERN = "yyyy年MM月dd日";
        /**
         * 模板路径
         */
        public static final String TEMPLATE = "/销售合同书生成模板.docx";
        /**
         * 合同文件名
         */
        public static final String FILE_NAME = "销售合同书-%s.docx";
        /**
         * 合同存储路径
         */
        public static final String BIZ_PATH = "/contract";
        /**
         * 合同文件名
         */
        public static final String FILE_NAME_WITHOUT_SUFFIX = "CMS销售合同书-%s";
        /**
         * 订单审批记录文件名
         */
        public static final String APPROVE_ATTACH_FILE_NAME = "CMS订单审批记录【测试】-%s.xlsx";
    }

    /**
     * 给om发送的通知邮件
     */
    public static final class ReminderEmail {
        /**
         * CMS通知标题
         */
        public static final String SUBJECT = "CMS通知";
        /**
         * 大客户部门
         */
        public static final String DEPART_DA_KE_HU = "KA";
        /**
         * 订单管理部门
         */
        public static final String DING_DAN_GUAN_LI = "OM";
        /**
         * 订单录入部门
         */
        public static final String DING_DAN_LU_RU = "OMKEY";
        /**
         * 订单详情path
         */
        public static final String ORDER_DETAIL_PATH = "/admin/orderForm/View/project/";
        /**
         * 订单详情path
         */
        public static final String PICK_LIST = "/admin/pickList";
        /**
         * 代办清单path
         */
        public static final String BUSINESS_LIST = "/personalOffice/HandleBusinessList";
        /**
         * 订单审批页面
         */
        public static final String ORDER_AUDIT = "/admin/orderForm/Audit?businessKey=%s&taskId=%s&processInstanceId=%s";
    }
}